let arr = ['吴亦凡','黄海波','张默','房祖名','李代沫','柯震东'];

let [w,h] = arr;

// console.log(w);
// console.log(h);

//解构数组后面的值,不需要的值可以通过留空的方式 然后用逗号隔开就可以了

let [,,,,,k] = arr;

// console.log(k);

//解构多维数组
let arr2 = ['吴亦凡',['罗志祥','jiejie',['范冰冰']],'柯震东','宁财神'];

let [,[l,,[f]]] = arr2;

// console.log(l);
// console.log(f);

//剩余元素的解构

// let [,,...name] = arr2;

// console.log(name);

// let [,n] = name;

// console.log(n);

//let [...name,k] = arr2; //这种写法是错误的 因为剩余元素必须是最后一个元素

let node = {
    personalInfo: {
        basicInfo: {
            name: {
                firstName: 'mike',
                lastName: 'deep'
            },
        }
    },
    levelRange: [1, 3]
};


let {personalInfo:{basicInfo:{name:{firstName}}},levelRange:[,num]} = node;

console.log(firstName);
console.log(num);